// Student.java
//
// Informatics 102 Spring 2012
// Code Example
//
// This version of the Student class is different from the one in the
// previous example of Student initialization, in that it contains two
// kinds of annotations: one that marks a method as an "initializer"
// and another that marks a method as requiring initialization.  Our
// aspect will use these annotations to inject code into the right
// methods.

public class Student
{
	private String name;
	
	
	public Student()
	{	
	}
	
	
	@RequiresInitialization
	public String getName()
	{
		return name;
	}
	
	
	@Initializer
	public void setName(String newName)
	{
		name = newName;
	}


	@RequiresInitialization
	public String toString()
	{
		return "Student(" + name + ")";
	}
}
